***load data

use "${path}\data\hsbt\hsbt_ready.dta", clear

***Online Appendix Tables

cd "${path}\output\tables"

***Table A.XXVII

foreach v of varlist hrsgenev broadcon unifying scirejct hrscreat prvwrong validalt nodarwin {

eststo: reg `v' evo_score $basic_controls $undergraduate_controls $degree_controls $continuing_education_controls $assessment_test $evolution_controls $geographic_controls , vce(cluster ST_POSTA) baselevels
estadd ysumm
estadd scalar NObs =round(e(N),10)
}
esttab using teacher_style.tex, replace keep(evo_score) b(3) se(3) fragment nomtitles nonotes label /// 
stats(ymean ysd  r2_a N, labels ("Mean of Dep. Var." "Std. Dev. of Dep. Var." "Adj. R-squared" "Observations") fmt(2 2 3 %9.0fc))  /// 
mgroups("Pro-Evolution Teaching" "Pro-Creationism Teaching", pattern(1 0 0 0 1 0 0 0) prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) /// 
mlabels("\specialcell{Teaching \\ Hours \\ On \\ Evolution}" "\specialcell{Emphasize \\ Consensus \\ about \\  Evolution}" "\specialcell{Agree: \\ Evolution \\ Is Unifying \\ Theme}" "\specialcell{Emphasize \\ Scientists \\ Reject \\ Creationism}"  "\specialcell{Teaching \\ Hours \\ On \\ Creationism}"   "\specialcell{Emphasize \\ Evolution \\ May Be \\ Wrong}" "\specialcell{Emphasize \\ Creationism \\ As Valid \\ Alternative}" "\specialcell{Believe \\ Evolution \\ Not Needed \\ For Good Course}") ///
indicate("Controls =gender" , labels("YES" "NO")) ///
star(* 0.1 ** 0.05 *** 0.01)
eststo clear

***Online Appendix Figures

cd "${path}\output\figures"

***Figure A.I

hist statesci, discrete width(0.5) percent addlabel addlabopts(yvarformat(%2.1f)) color(navy) lcolor(none) graphregion(color(white)) xlabel(1 "Strongly Disagree" 2 "Disagree" 3 "Agree" 4 "Strongly Agree", labsize(small)) xtitle("") plotregion(lcolor(black)lwidth(none))
graph export "${path}\output\figures\hist.pdf", replace


